package com.dji.sample.wayline.model.enums;

import lombok.Getter;

import java.util.Arrays;


@Getter
public enum FlyerStatusEnum {

    ACTIVE(1),

    INACTIVE(2),

    UNKNOWN(-1);

    int val;

    FlyerStatusEnum(int val) {
        this.val = val;
    }

    public static FlyerStatusEnum find(int val) {
        return Arrays.stream(FlyerStatusEnum.values()).filter(statue -> statue.val == val).findAny().orElse(UNKNOWN);
    }
}
